<template>
    <!-- 歌手详情页-右边 -->
    <div class="detail_r">
        <div class="similar_list">
            <h3 class="title">
                <span>热门歌手</span>
            </h3>
            <ul>
                <li v-for="item in artistList" :key="item.id" @click="$router.push(`/artlist/${item.id}`)">
                    <img :src="item.picUrl" alt="">
                    <span :title="item.name+'的音乐'" class="ellipsis name">{{ item.name }}</span>
                </li>
            </ul>
        </div>
        <div class="menu">
            <h3 class="title">
                <span>用户wiki</span>
            </h3>
            <p>
                <img src="@/assets/images/public/edit.png" alt="">
                <span>补充或修改艺人资料</span>
            </p>
            <p>
                <img src="@/assets/images/public/text.png" alt="">
                <span>用户wiki任务中心</span>
            </p>
        </div>
        <div class="more">
            <h3 class="title">
                <span>了解更多 &gt;&gt;</span>
            </h3>
            <ul class="bg">
                <li><a class="ios"></a></li>
                <li><a class="pc"></a></li>
                <li><a class="aos"></a></li>
            </ul>
            <p>同步歌单，随时畅听320k好音乐</p>
        </div>
    </div>
</template>

<script>
import { HotArtistApi } from '@/request/api';
export default {
    data () {
        return {
            list: "",
            artistList: "",
        }
    },
    computed: {
        id() {
          return this.$route.params.id;
        },

    },
    created() {
        HotArtistApi().then((res) => {
            // console.log(res);
            this.list = res.data.artists;
            this.artistList = this.list.filter(item=>{
                return item.id !== this.id;
            }).slice(0, 6);
        });
    }
}
</script>
 
<style lang = "less" scoped>
@import "../../assets/base.less";
.detail_r {
    width: 240px;
    background-color: #fff;
    border-right: 1px solid #D7D7D7;
    border-left: 1px solid #D7D7D7;
    padding: 40px 20px;
    .similar_list {
        .title {
            border-bottom: 1px solid #ccc;
            margin-bottom: 20px;
            padding-bottom: 10px;
            span {
                color: #333;
                font-size: 12px;
                font-weight: bolder;
            }
        }
        ul {
            flex-wrap: wrap;
            display: flex;
            justify-content: flex-start !important;
            li {
                width: 50px;
                height: 90px;
                padding: 0 43px 0 0;
                text-align: center;
                &:nth-of-type(3n) {
                    padding-right: 0;
                }
                img {
                    cursor: pointer;
                    width: 50px;
                    height: 50px;
                }
                .name {
                    display: block;
                    height: 16px;
                    width: 50px;
                    font-size: 12px;
                    color: #333;
                    &:hover {
                        cursor: pointer;
                        text-decoration: underline;
                    }
                }
            }
        }
    }
    .menu {
        padding: 0 0 20px;
        .title {
            border-bottom: 1px solid #ccc;
            margin-bottom: 20px;
            padding-bottom: 10px;
            span {
                color: #333;
                font-size: 12px;
                font-weight: bolder;
            }
        }
        p {
            height: 20px;
            color: #333;
            font-size: 12px;
            display: flex;
            align-items: center;
            margin-bottom: 10px;
            &:hover {
                cursor: pointer;
                text-decoration: underline;
            }
        }
    }
    .more {
        .title {
            border-bottom: 1px solid #ccc;
            margin-bottom: 20px;
            padding-bottom: 10px;
            span {
                color: #333;
                font-size: 12px;
                font-weight: bolder;
            }
        }
        .bg {
            height: 48px;
            display: flex;
            align-content: center;
            justify-content: space-between !important;
            margin-bottom: 20px;
            .ios {
                width: 42px;
                height: 48px;
                display: block;
                background: url("@/assets/images/public/sprite.png");
                background-position: 0 -392px;
                &:hover {
                    cursor: pointer;
                    background-position: 0 -472px;
                }
            }
            .pc {
                width: 60px;
                height: 48px;
                display: block;
                background: url("@/assets/images/public/sprite.png");
                background-position: -72px -392px;
                &:hover {
                    cursor: pointer;
                    background-position: -72px -472px;
                }
            }
            .aos {
                width: 42px;
                height: 48px;
                display: block;
                background: url("@/assets/images/public/sprite.png");
                background-position: -163px -392px;
                &:hover {
                    cursor: pointer;
                    background-position: -163px -472px;
                }
            }
        }
        p {
            font-size: 12px;
            color: #999;
        }
    }
}
</style>